/*
Parallax Plugin V 1.0
Author: Nino Zumstein
Date  : 12.09.2016
*/
/*DO NOT USE THIS VERSION OF THE PARALLAX.JS, THIS IS FOR DEMO PURPOSE ONLY*/
(function ($) {
  $("#c_portalResSearch_total-16141329776104792 .p_searchBtn").click(
    function () {
      location.href = "/search.html";
    }
  );

  $.fn.parallax = function (options) {
    var parallax_element = this;
    var settings = {
      speed: "100",
      ascending: true,
      delay: "1000",
    };
    if (options) {
      $.extend(settings, options);
    }
    var ad = "+";
    if (!settings["ascending"] == true) {
      var ad = "-";
    }
    $(window).scroll(function () {
      var wScroll = $(this).scrollTop();
      parallax_element.css({
        transform: "translate(0px, " + ad + wScroll / settings["speed"] + "%)",
        "transition-duration": settings["delay"] + "ms",
      });
    });
  };
})(jQuery);
$(document).ready(function () {
  var ww = $(window).width();
  if (ww > 1024) {
    $(".parallax").parallax({
      speed: 90,
      delay: 1000,
    });
    $("#w_grid-1614151865372").parallax({
      speed: 100,
      delay: 1000,
      ascending: false,
    });
    $("#w_grid-1614151865322").parallax({
      speed: 150,
      delay: 1000,
    });
    $("#w_grid-1614151865362").parallax({
      speed: 50,
      delay: 1000,
      ascending: false,
    });
    $("#w_grid-1614151865332").parallax({
      speed: 150,
      delay: 1000,
    });
    $(".parallax-1").parallax({
      speed: 200,
      delay: 1000,
    });
    $(".parallax-2").parallax({
      speed: 200,
      delay: 1000,
      ascending: false,
    });
    $(".parallax-3").parallax({
      speed: 150,
      delay: 1000,
    });
    $(".parallax-4").parallax({
      speed: 90,
      delay: 1000,
      ascending: false,
    });
  }
});
